package com.demo.springboot.listener;

import com.dangdang.ddframe.job.executor.ShardingContexts;
import com.dangdang.ddframe.job.lite.api.listener.ElasticJobListener;


/**
 * @author wangfengchen
 * 所有节点都执行的监听器
 */
public class MyNormalListener  implements ElasticJobListener {
    @Override
    public void beforeJobExecuted(ShardingContexts shardingContexts) {
        System.out.println("我是"+shardingContexts.getJobName()+"作业，在方法前！");
    }

    @Override
    public void afterJobExecuted(ShardingContexts shardingContexts) {
        System.out.println("我是"+shardingContexts.getJobName()+"作业，在方法后！");
    }
}
